//
//  ScriptDataCollection.cpp
//  Phidgets
//
//  Created by Daniel Hazelbaker on 12/29/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#include "ScriptDataCollection.h"
#include "SystemDatabase.h"
#include "SqlStatement.h"


//
// Load all the script data objects from the database.
//
void ScriptDataCollection::LoadAll()
{
    SqlParameters params = SqlParameters();
    SqlStatement *stmt;
    
    
    stmt = gSharedDatabase->prepareStatement("SELECT * FROM scripts", params);
    
    while (stmt->NextRow())
    {
        push_back(ScriptData(stmt));
    }
    
    delete stmt;
}